package PubSub;

/**
 * @author duanzhizhou
 * @date 2024/10/10
 */
public class Client {
    public static void main(String[] args) {
        Observer zhangsan = new StockObserver("张三");
        Observer lisi = new StockObserver("李四");
        Observer wangwu = new NBAObserver("王五");
        
        AbstractSubject sub = new Boss("胡汉三");
        
        sub.attach(zhangsan);
        sub.attach(lisi);
        sub.attach(wangwu);
        
        sub.detach(lisi);
        
        sub.status = "我回来了";
        
        sub.notifyObservers();
        
        
    }
}
